<template>
    <md-field >
      <md-skeleton title :loading="remoteDataLoading" :row="8">
        <md-field>
          <p style="text-align:center; margin-top:40px;">
            <img src="../assets/logo.png" style="width:76px; "/>
            <span style="display:block; font-size:20px;">已退出登录状态</span>
          </p>
        </md-field>
        <md-field>
          <md-field-item></md-field-item>
          <md-button type="primary" @click="onSubmitRelogin" >重新登录</md-button>
        </md-field>
      </md-skeleton>
    </md-field>
</template>

<script>
import { toLogout } from "@libs/login.js"
import { Field, CellItem, Skeleton, Button, FieldItem } from 'mand-mobile'

export default {
  name: "Logout",
  components: {
    [Field.name]: Field,
    [CellItem.name]: CellItem,
    [Skeleton.name]: Skeleton,
    [Button.name]: Button,
    [FieldItem.name]: FieldItem
  },
  data() {
    return {
      remoteDataLoading: false
    }
  },
  mounted() {
    toLogout()
  },
  methods: {
    onSubmitRelogin() {
      this.$router.push( { path: '/' })
    }
  }
}
</script>

<style scoped>
.bg > p {
  margin: 100px;
  text-align: center;
  display: block;
  font-size: 20px;
}
</style>
